﻿/**********************************************************************
* @file   OperGraphTool.h
* @brief  可视化工具事件操作器
* @author BaGuijun (baguijun@163.com)
* @date   2025-02-20
*********************************************************************/
#ifndef _OperGraphTool_H__
#define _OperGraphTool_H__
 
#include "OperGraphEvent3D.h"
#include "OperatorsInterface/GraphEventOperator.h"
 
#include "FITK_Kernel/FITKCore/FITKOperatorRepo.h"
 
namespace GUIOper
{
    /**
    * @brief  可视化工具事件操作器
    * @author BaGuijun (baguijun@163.com)
    * @date   2025-02-20
    */
    class OperGraphTool : public OperGraphEvent3D
    {
        Q_OBJECT;
    public:
        /**
        * @brief    构造函数
        * @author   BaGuijun (baguijun@163.com)
        * @date     2025-02-20
        */
        explicit OperGraphTool() = default;
        /**
        * @brief    析构函数
        * @author   BaGuijun (baguijun@163.com)
        * @date     2025-02-20
        */
        ~OperGraphTool() = default;
        /**
        * @brief    创建渲染工具
        * @param[i] type                    渲染工具类型
        * @return   int                     渲染工具id
        * @author   BaGuijun (baguijun@163.com)
        * @date     2025-02-21
        */
        int createGraphTool(EventOper::GraphToolType type) override;
        /**
        * @brief    删除渲染工具
        * @param[i] toolId                       渲染工具id
        * @author   BaGuijun (baguijun@163.com)
        * @date     2025-02-21
        */
        void deleteToolObject(const int& toolId) override;
        /**
        * @brief    更新工具方向数据
        * @param[i] objId                        渲染工具id
        * @param[i] direction                    方向
        * @param[i] pos                          位置
        * @author   BaGuijun (baguijun@163.com)
        * @date     2025-02-21
        */
        void updateDirection(int objId, double* direction, double* pos) override;
    };

    Register2FITKOperatorRepo(OperGraphTool, OperGraphTool);
}

#endif